﻿<UserControl x:Class="Kokomo.Environment.Hosting.ErrorDocumentView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
			 xmlns:env="clr-namespace:Kokomo.Environment"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
	<FrameworkElement.Resources>
		<BitmapImage x:Key="ErrorImage" UriSource="../images/error.png"/>
	</FrameworkElement.Resources>
	<Grid>
		<Border Style="{DynamicResource {x:Static env:EditorStyleKeys.SectionBorderStyleKey}}">
			<FlowDocumentScrollViewer>
				<FlowDocument FontFamily="Tahoma">
					<Paragraph>
						<Image
							Source="{StaticResource ErrorImage}"
							Width="32"
							Height="32"
							HorizontalAlignment="Left"
							VerticalAlignment="Top"
							Margin="6"
							/>
						<Run
							FontWeight="Bold"
							Text="{Binding Path=MainCaption, Mode=OneWay}"
							/>
					</Paragraph>

					<Paragraph>
						<Run
							Text="{Binding Path=Detail, Mode=OneWay}"
							/>
					</Paragraph>
					<BlockUIContainer>
						<ItemsControl
							Grid.Column="1"
							Grid.Row="2"
							Margin="16"
							ItemsSource="{Binding CommandViewModels}"
							/>
					</BlockUIContainer>
					<Paragraph>
						<Run Text="{Binding Path=Exception, Mode=OneWay}"/>
					</Paragraph>
				</FlowDocument>
			</FlowDocumentScrollViewer>
		</Border>
	</Grid>
</UserControl>
